package com.atguigu.gulimall.product.vo;

import com.atguigu.gulimall.product.entity.SkuImagesEntity;
import com.atguigu.gulimall.product.entity.SkuInfoEntity;
import com.atguigu.gulimall.product.entity.SpuInfoDescEntity;
import lombok.Data;

import java.util.List;

/**
 * @author ming
 * @create 2022/5/3
 * @description:
 */
@Data
public class SkuItemVo {
    //sku基本信息 pms_sku_info
     SkuInfoEntity info;
     boolean hasStock=true;
    //sku图片信息
    List<SkuImagesEntity> images;
    //获取spu的销售属性
    List<ItemSaleAttrsVo> saleAttr;
    //spu的介绍
    SpuInfoDescEntity desp;
    //获取spu规格参数信息
    List<SpuItemAttrGroupVo> groupAttrs;
    SeckInfoVo seckillInfo;//当前秒杀优惠信息
    @Data
    public static  class ItemSaleAttrsVo{
        private Long attrId;
        private String attrName;
        private List<AttrValueWithSkuIdVo> attrValues;
        
    }
    @Data
    public static class SpuItemAttrGroupVo{
        private String groupName;
        private List<SpuBaseAttrVo> attrs;
    }
    @Data
    public static class SpuBaseAttrVo{
        private String attrName;
        private String attrValue;
    }
    @Data
    public static class AttrValueWithSkuIdVo{
        private String attrValue;
        private String skuIds;
    }
}
